{$CLEO .cs}
0000:


:weapon_Menus
//show_styled_text "~w~Super Weapons Ammunation" 3000 4
 
01B4: set_player $PLAYER_CHAR can_move 0
0687: clear_actor $PLAYER_ACTOR task
0647: AS_actor $PLAYER_ACTOR clear_look_task
03E6: remove_text_box
wait 200  

0ADF: add_dynamic_GXT_entry "buyname" text "~w~Super Weapons Ammunation"   
//0ADF: add_dynamic_GXT_entry "buyinfo" text "Buy a weapon so you can to kill zombies easily, but use it wisely or your out of ammos."
0ADF: add_dynamic_GXT_entry "buy01" text "Desert Eagle ~w~$200 ~y~x30 ammos"
0ADF: add_dynamic_GXT_entry "buy02" text "Minigun ~w~$15000 ~y~x150 ammos"
0ADF: add_dynamic_GXT_entry "buy03" text "Sniper Rifle ~w~$5000 ~y~x60 ammos"
0ADF: add_dynamic_GXT_entry "buy04" text "Shovel ~w~$600"
0ADF: add_dynamic_GXT_entry "buy05" text "Ak47 ~w~$1500 ~y~x60 ammos"
0ADF: add_dynamic_GXT_entry "buy06" text "Molotovs ~w~$600 ~y~x5 packs"
0ADF: add_dynamic_GXT_entry "buy07" text "Grenades ~w~$1000 ~y~x5 packs" 
0ADF: add_dynamic_GXT_entry "buy08" text "Combat Shotgun ~w~$1000 ~y~x30 ammos" 
0ADF: add_dynamic_GXT_entry "buy09" text "MP5 ~w~$1500 ~y~x40 ammos" 
0ADF: add_dynamic_GXT_entry "buy10" text "M4 ~w~$3000 ~y~x60 ammos" 
0ADF: add_dynamic_GXT_entry "buy11" text "Silenced Pistol  ~w~$900 ~y~30 ammos" 
0ADF: add_dynamic_GXT_entry "buy12" text "Heatseek  ~w~$10000 ~y~x7 ammos" 



///0512: show_permanent_text_box 'buyinfo' 
08D4: 4@ = create_panel_with_title 'buyname' position  340.0  120.0 width  240.0 columns  1 interactive  1 background  1 alignment  0
08DB: set_panel 4@ column  0 header 'dummy' data 'buy01' 'buy02' 'buy03' 'buy04' 'buy05' 'buy06' 'buy07' 'buy08' 'buy09' 'buy10' 'buy11' 'buy12'
090E: set_panel 4@ active_row  0
01B4: set_player $PLAYER_CHAR can_move 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
08D6: set_panel 4@ column 0 alignment 1

:weapon_Menu_1
wait  0
if
0256:   player $PLAYER_CHAR defined
jf @weapon_Menu_21
if
00E1:   key_pressed  0  15//--- key = Enter/Exit
jf @weapon_Menu_2
jump @weapon_Menu_21//--jump to menue exit

:weapon_Menu_2
if
00E1:   key_pressed  0  16//--- key = Ped SPRINT
jf @weapon_Menu_1
03E6: remove_text_box
08D7: 5@ = panel 4@ active_row//-- submit number of the highlighted button into variable
if and
0039:   5@ ==  0  // integer values
010A:   player $PLAYER_CHAR money > 200
jf @weapon_Menu_3      
0109: player $PLAYER_CHAR money += -200
actor.GiveWeaponAndAmmo($player_Actor,deserteagle, 30 )
0ACD: show_text_highpriority "You purchased a desert eagle." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0

wait  100
jump @weapon_Menu_1

:weapon_Menu_3
if  and
0039:   5@ ==  1  // integer values
010A:   player $PLAYER_CHAR money > 15000
jf @weapon_Menu_4
0109: player $PLAYER_CHAR money += -15000
actor.GiveWeaponAndAmmo($player_Actor,Minigun, 150 )
0ACD: show_text_highpriority "You purchased a minigun." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0
wait 100
jump @weapon_Menu_1

:weapon_Menu_4
if  and
010A:   player $PLAYER_CHAR money > 5000
0039:   5@ ==  2  // integer values
jf @weapon_Menu_5
0109: player $PLAYER_CHAR money += -5000
actor.GiveWeaponAndAmmo($player_Actor,sniperrifle, 30 )
0ACD: show_text_highpriority "You purchase a sniper rifle." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0
//gosub @player2_give_weapons
wait 100
jump @weapon_Menu_1

:weapon_Menu_5
if and
010A:   player $PLAYER_CHAR money > 600
0039:   5@ ==  3  // integer values
jf @weapon_Menu_6
0109: player $PLAYER_CHAR money += -600
actor.GiveWeaponAndAmmo($player_Actor,shovel, 99999 )
0ACD: show_text_highpriority "You purchase a shovel." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0
//gosub @player2_give_weapons
wait 100
jump @weapon_Menu_1

:weapon_Menu_6
if and
010A:   player $PLAYER_CHAR money > 1500
0039:   5@ ==  4  // integer values
jf @weapon_Menu_7
0109: player $PLAYER_CHAR money += -1500
actor.GiveWeaponAndAmmo($player_Actor,ak47, 60 )
0ACD: show_text_highpriority "You purchase a Ak47." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0
//gosub @player2_give_weapons
wait 100
jump @weapon_Menu_1

:weapon_Menu_7
if and
010A:   player $PLAYER_CHAR money > 600
0039:   5@ ==  5  // integer values
jf @weapon_Menu_8
0109: player $PLAYER_CHAR money += -600
actor.GiveWeaponAndAmmo($player_Actor,Molotov, 5 )
0ACD: show_text_highpriority "You purchase molotovs." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0
//gosub @player2_give_weapons
wait 100
jump @weapon_Menu_1

:weapon_Menu_8
if  and
010A:   player $PLAYER_CHAR money > 1000
0039:   5@ ==  6  // integer values
jf @weapon_Menu_9
0109: player $PLAYER_CHAR money += -1000
actor.GiveWeaponAndAmmo($player_Actor,grenades, 5 )
0ACD: show_text_highpriority "You purchase grenades." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0
//gosub @player2_give_weapons
wait 100
jump @weapon_Menu_1

:weapon_Menu_9
if  and 
010A:   player $PLAYER_CHAR money > 1000
0039:   5@ ==  7  // integer values
jf @weapon_Menu_10
0109: player $PLAYER_CHAR money += -1000
actor.GiveWeaponAndAmmo($player_Actor,CombatShotgun, 30 )
0ACD: show_text_highpriority "You purchase Combat Shotgun." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0

wait 100
jump @weapon_Menu_1

:weapon_Menu_10
if  and 
010A:   player $PLAYER_CHAR money > 1500
0039:   5@ ==  8  // integer values
jf @weapon_Menu_11
0109: player $PLAYER_CHAR money += -1500 
actor.GiveWeaponAndAmmo($player_Actor,mp5 , 40 )
0ACD: show_text_highpriority "You purchase MP5." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0

wait 100
jump @weapon_Menu_1

:weapon_Menu_11
if  and 
010A:   player $PLAYER_CHAR money > 3000
0039:   5@ ==  9  // integer values
jf @weapon_Menu_12
0109: player $PLAYER_CHAR money += -3000
actor.GiveWeaponAndAmmo($player_Actor, m4   , 60 )
0ACD: show_text_highpriority "You purchase M4"  time 3000
018C: play_sound 1052 at 0.0 0.0 0.0

wait 100
jump @weapon_Menu_1

:weapon_Menu_12
if  and 
010A:   player $PLAYER_CHAR money > 900
0039:   5@ ==  10  // integer values
jf @weapon_Menu_13
0109: player $PLAYER_CHAR money += -900
actor.GiveWeaponAndAmmo($player_Actor,  Silenced, 30 )
0ACD: show_text_highpriority "You purchase silenced pistol." time 3000
018C: play_sound 1052 at 0.0 0.0 0.0

wait 100
jump @weapon_Menu_1

:weapon_Menu_13
if  and 
010A:   player $PLAYER_CHAR money > 10000
0039:   5@ ==  11  // integer values
jf @weapon_Menu_1          //release
0109: player $PLAYER_CHAR money += -10000
actor.GiveWeaponAndAmmo($player_Actor, HeatSeek, 7 )
0ACD: show_text_highpriority "You purchase heatseek" time 3000
018C: play_sound 1052 at 0.0 0.0 0.0

wait 100
jump @weapon_Menu_1

:weapon_Menu_21

01B4: set_player $PLAYER_CHAR can_move 1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
08DA: remove_panel 4@
03E6: remove_text_box
gosub @player2_give_weapons
wait 100
return
jump @weapon_Menus

             
:player2_give_weapons
if
056D:   actor $second_player_actor  defined
jf @not_player2
09F8: give_player2_weapons_of_player1


:not_player2
 
01B4: set_player $PLAYER_CHAR can_move 1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0


0A93: terminate_this_custom_script
 